<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class ChangeTaskStepTypeAddTotoTypeInTaskTable extends AbstractMigration
{
    public function up()
    {
        $users = $this->table('task');
        $users
            ->changeColumn('step_type', 'enum', [
                'values' => 'step,step_category,to_do,work_order_to_do,entity_to_do,standard_meeting,standard_review,standard_make_to_do',
                'default' => 'step',
                'comment' => '任务工序关联类型,step工序任务,step_category 工序分类任务,to_do 待办任务,work_order_to_do 工单待办任务,entity_to_do 实体待办,standard_meeting 标准会议待办,standard_review 标准审核,standard_make_to_do 标准制作待办',
            ])
            ->save();
    }

    public function down()
    {
        $this->table('task')
            ->changeColumn('step_type', 'enum', [
                'values' => 'step,step_category,to_do,work_order_to_do,entity_to_do',
                'default' => 'step',
                'comment' => '任务工序关联类型，step工序任务，step_category 工序分类任务，to_do 待办任务，work_order_to_do 工单待办任务,entity_to_do 实体待办',
            ])
            ->save();
    }
}
